using System;
using System.Collections;

namespace stunnware.CRM.Fetch {
   /// <summary>
   /// A collection of link entities.
   /// </summary>
   public class FetchLinkEntityCollection : System.Collections.CollectionBase {
 
      /// <summary>
      /// Default constructor.
      /// </summary>
      public FetchLinkEntityCollection() {
      }

      /// <summary>
      /// Gets or sets an item at the specified index.
      /// </summary>
      public FetchLinkEntity this[int index] {
         get {
            return (FetchLinkEntity) List[index];
         }

         set {
            List[index] = value;
         }
      }

      /// <summary>
      /// Adds an item to the collection.
      /// </summary>
      /// <param name="value">The item to add.</param>
      /// <returns></returns>
      public int Add(FetchLinkEntity value) {
         return List.Add(value);
      }

      /// <summary>
      /// Returns the index of an item.
      /// </summary>
      /// <param name="value">The item to look for.</param>
      /// <returns>The index.</returns>
      public int IndexOf(FetchLinkEntity value) {
         return List.IndexOf(value);
      }

      /// <summary>
      /// Inserts an item at a speicifed position.
      /// </summary>
      /// <param name="index">The position.</param>
      /// <param name="value">The item to add.</param>
      public void Insert(int index, FetchLinkEntity value) {
         List.Insert(index, value);
      }

      /// <summary>
      /// Removes an item from the collection.
      /// </summary>
      /// <param name="value"></param>
      public void Remove(FetchLinkEntity value)  {
         List.Remove(value);
      }

      /// <summary>
      /// Checks if the collection contains an item.
      /// </summary>
      /// <param name="value">The item to look for.</param>
      /// <returns></returns>
      public bool Contains(FetchLinkEntity value)  {
         return List.Contains(value);
      }      
   }
}